home *** CD-ROM | disk | FTP | other *** search
- 10 ;SRCH DSK 6
- 80 G JSR GET;ROUTINE FOR KEYBOARD ENTRY
- 90 BEQ G
- 91 CMP #$0D;RETURN = END OF SEARCH STRING
- 92 BNE T
- 93 RTS
- 94 ;
- 95 ;CONVERT ASCII TO HEX
- 96 ;
- 100 T JSR PRINT;KEY STOKE IN ASCII PRINT IT
- 105 JSR TEN;CONVERT FIRST KEYSTROKE
- 110 G1 JSR GET
- 111 BEQ G1
- 120 JSR PRINT
- 125 JSR ONE;CONVERT 2ND KEYSTROKE
- 130 LDX X
- 140 STA SRCH,X;PUT SEARCH STRING INTO MEMORY
- 150 INX
- 160 STX X
- 161 INC STRING;VARIABLE HOW LONG SEARCH STRING
- 165 JMP G;GET ANOTHER BYTE
- 170 TEN CMP #$41;# GREATER THAN 9 (A B ETC)
- 180 BCC NUM
- 184 ;EXAMPLE #$B5
- 185 ;HOLDS THE B (#$42) IN #$B5
- 186 ; 01000010
- 190 SEC
- 200 SBC #$07;#$3B 00111011
- 210 NUM AND #$0F; 00001111
- 215 ;EQUALS 00001011
- 220 ASL; 00010110
- 225 ASL; 00101100
- 226 ASL; 01011000
- 227 ASL; 10110000 = #$B0
- 230 STA TEMP
- 240 RTS
- 250 ONE CMP #$41;THE #$05 IN #$B5
- 260 BCC NUM1
- 270 SEC
- 280 SBC #$07
- 285 ;EXAMPLE 00000101
- 290 NUM1 AND #$0F; 00001111
- 295 ;EQUALS #$05 00000101
- 300 CLC
- 310 ADC TEMP;#$B0 + #$05 = #$B5
- 320 RTS
- 380 .FILE SRCH DSK 7
-